package com.peanutplan.blog.model.vo;

import org.apache.commons.lang3.StringUtils;

import com.peanutplan.blog.dao.ContentVoMapper;
import com.peanutplan.blog.utils.SpringUtils;

public class CollectionVo {
    private Integer uid;

    private Integer cid;

    private Integer created;
    
    private String title;

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public Integer getCreated() {
        return created;
    }

    public void setCreated(Integer created) {
        this.created = created;
    }

	public String getTitle() {
		if(StringUtils.isBlank(this.title) && this.cid!=null) {
			ContentVoMapper d = SpringUtils.getBean(ContentVoMapper.class);
			this.title = d.selectByPrimaryKey(cid).getTitle();
		}
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
}